import { axios } from '@/utils/request'

export function getWard (ward, department) {
  return axios({
    url: '/ward/get',
    method: 'get',
    params: {
      'ward': ward,
      'department': department
    }
  })
}
export function getWardByDoctor (doctor) {
  return axios({
    url: '/ward/doctor',
    method: 'get',
    params: {
      'doctor': doctor
    }
  })
}
export function getNurse (nurse) {
  return axios({
    url: '/ward/getNurseName',
    method: 'get',
    params: {
      'name': nurse
    }
  })
}
export function deleteWard (ward) {
  return axios({
    url: '/ward/del',
    method: 'delete',
    params: {
      number: ward
    }
  })
}

export function addWard (ward) {
  return axios({
    url: '/ward/add',
    method: 'post',
    data: ward
  })
}

export function updateWard (ward) {
  return axios({
    url: '/ward/update',
    method: 'post',
    data: ward
  })
}

export function getBedPatientList (ward) {
  return axios({
    url: '/ward/patient/list',
    method: 'get',
    params: {
      ward: ward
    }
  })
}
